<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>排班管理 - 学校智能服务大厅</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        /* 共用样式已存在于manage_v1.3.html中 */
                :root {
            --primary-color: #1E40AF;
            --secondary-color: #3B82F6;
            --accent-color: #F97316;
            --success-color: #10B981;
            --warning-color: #FBBF24;
            --danger-color: #EF4444;
            --light-color: #F8FAFC;
            --dark-color: #1E293B;
            --gray-color: #64748B;
            --border-color: #E2E8F0;
            --shadow-color: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background-color: #F1F5F9;
            color: var(--dark-color);
            display: flex;
            min-height: 100vh;
        }

        /* 侧边栏样式 */
        .sidebar {
            width: 240px;
            background-color: white;
            box-shadow: var(--shadow-color);
            z-index: 10;
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
        }

        .sidebar-header {
            padding: 1.5rem;
            display: flex;
            align-items: center;
            border-bottom: 1px solid var(--border-color);
        }

        .sidebar-header img {
            width: 40px;
            height: 40px;
            border-radius: 8px;
            margin-right: 10px;
        }

        .sidebar-header h1 {
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--primary-color);
        }

        .sidebar-menu {
            padding: 1rem 0;
            flex: 1;
            overflow-y: auto;
        }

        .menu-title {
            padding: 0 1.5rem;
            margin-top: 1rem;
            margin-bottom: 0.5rem;
            font-size: 0.75rem;
            text-transform: uppercase;
            color: var(--gray-color);
            letter-spacing: 0.5px;
        }

        .menu-item {
            margin-bottom: 2px;
        }

        .menu-link {
            display: flex;
            align-items: center;
            padding: 0.75rem 1.5rem;
            color: var(--dark-color);
            text-decoration: none;
            font-size: 0.9rem;
            transition: all 0.2s ease;
            position: relative;
        }

        .menu-link:hover {
            background-color: rgba(30, 64, 175, 0.05);
        }

        .menu-link.active {
            background-color: rgba(30, 64, 175, 0.1);
            color: var(--primary-color);
        }

        .menu-link.active::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            height: 100%;
            width: 4px;
            background-color: var(--primary-color);
        }

        .menu-link i {
            margin-right: 10px;
            font-size: 1rem;
            width: 20px;
            text-align: center;
        }

        .submenu {
            padding-left: 1.5rem;
            background-color: rgba(0, 0, 0, 0.02);
            display: none;
        }

        .submenu.active {
            display: block;
        }

        .submenu-link {
            display: block;
            padding: 0.75rem 1.5rem 0.75rem 2.5rem;
            color: var(--dark-color);
            text-decoration: none;
            font-size: 0.85rem;
            transition: all 0.2s ease;
        }

        .submenu-link:hover {
            background-color: rgba(30, 64, 175, 0.05);
            color: var(--primary-color);
        }

        .submenu-link.active {
            color: var(--primary-color);
            font-weight: 500;
            background-color: rgba(30, 64, 175, 0.05);
        }

        .sidebar-footer {
            padding: 1rem;
            border-top: 1px solid var(--border-color);
        }

        .user-profile {
            display: flex;
            align-items: center;
        }

        .user-profile img {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 10px;
        }

        .user-info h4 {
            font-size: 0.9rem;
            font-weight: 500;
            margin-bottom: 2px;
        }

        .user-info p {
            font-size: 0.75rem;
            color: var(--gray-color);
        }

        /* 主内容区域样式 */
        .main-container {
            flex: 1;
            display: flex;
            flex-direction: column;
            min-width: 0;
        }

        .main-header {
            padding: 1rem 1.5rem;
            background-color: white;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--border-color);
            position: sticky;
            top: 0;
            z-index: 5;
        }

        .header-left {
            display: flex;
            align-items: center;
        }

        .toggle-sidebar-btn {
            background: none;
            border: none;
            font-size: 1.2rem;
            color: var(--gray-color);
            cursor: pointer;
            margin-right: 1.5rem;
            transition: color 0.2s ease;
        }

        .toggle-sidebar-btn:hover {
            color: var(--primary-color);
        }

        .breadcrumb {
            display: flex;
            align-items: center;
            font-size: 0.9rem;
        }

        .breadcrumb-item:not(:last-child)::after {
            content: '/';
            margin: 0 0.5rem;
            color: var(--gray-color);
        }

        .breadcrumb-item a {
            color: var(--gray-color);
            text-decoration: none;
        }

        .breadcrumb-item a:hover {
            color: var(--primary-color);
        }

        .breadcrumb-item.active {
            color: var(--primary-color);
            font-weight: 500;
        }

        .header-right {
            display: flex;
            align-items: center;
        }

        .header-action-btn {
            background: none;
            border: none;
            font-size: 1.1rem;
            color: var(--gray-color);
            cursor: pointer;
            margin-left: 1.5rem;
            position: relative;
            transition: color 0.2s ease;
        }

        .header-action-btn:hover {
            color: var(--primary-color);
        }

        .notification-badge {
            position: absolute;
            top: -5px;
            right: -5px;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background-color: var(--danger-color);
            color: white;
            font-size: 0.7rem;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .main-content {
            flex: 1;
            padding: 1.5rem;
            overflow-y: auto;
        }

        .content-header {
            margin-bottom: 1.5rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .content-title {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--dark-color);
        }

        .content-actions {
            display: flex;
            gap: 10px;
        }

        .btn {
            padding: 0.5rem 1rem;
            border-radius: 6px;
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            border: none;
            display: inline-flex;
            align-items: center;
        }

        .btn i {
            margin-right: 6px;
            font-size: 0.9rem;
        }

        .btn-primary {
            background-color: var(--primary-color);
            color: white;
        }

        .btn-primary:hover {
            background-color: #1E40AFE0;
        }

        .btn-outline {
            background-color: transparent;
            border: 1px solid var(--border-color);
            color: var(--dark-color);
        }

        .btn-outline:hover {
            border-color: var(--primary-color);
            color: var(--primary-color);
        }

        .btn-icon {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background-color: transparent;
            color: var(--gray-color);
            border: 1px solid var(--border-color);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-icon:hover {
            color: var(--primary-color);
            border-color: var(--primary-color);
        }

        .card {
            background-color: white;
            border-radius: 12px;
            box-shadow: var(--shadow-color);
            overflow: hidden;
            margin-bottom: 1.5rem;
        }

        .card-header {
            padding: 1rem 1.5rem;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .card-title {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--dark-color);
        }

        .card-body {
            padding: 1.5rem;
        }

        .table-container {
            overflow-x: auto;
        }

        .data-table {
            width: 100%;
            border-collapse: collapse;
        }

        .data-table th,
        .data-table td {
            padding: 0.75rem 1rem;
            text-align: left;
        }

        .data-table thead {
            background-color: var(--light-color);
        }

        .data-table th {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--gray-color);
            border-bottom: 1px solid var(--border-color);
        }

        .data-table tbody tr {
            border-bottom: 1px solid var(--border-color);
            transition: background-color 0.2s ease;
        }

        .data-table tbody tr:hover {
            background-color: rgba(30, 64, 175, 0.03);
        }

        .data-table td {
            font-size: 0.9rem;
        }

        .table-actions {
            display: flex;
            gap: 8px;
            justify-content: center;
        }

        .table-action-btn {
            background: none;
            border: none;
            font-size: 0.9rem;
            cursor: pointer;
            transition: color 0.2s ease;
            padding: 4px;
            border-radius: 4px;
        }

        .view-btn {
            color: var(--primary-color);
        }

        .edit-btn {
            color: var(--accent-color);
        }

        .delete-btn {
            color: var(--danger-color);
        }

        .table-action-btn:hover {
            background-color: rgba(0, 0, 0, 0.05);
        }

        .badge {
            display: inline-block;
            padding: 0.3rem 0.6rem;
            border-radius: 16px;
            font-size: 0.75rem;
            font-weight: 500;
        }

        .badge-success {
            background-color: rgba(16, 185, 129, 0.1);
            color: var(--success-color);
        }

        .badge-warning {
            background-color: rgba(249, 115, 22, 0.1);
            color: var(--accent-color);
        }

        .badge-danger {
            background-color: rgba(239, 68, 68, 0.1);
            color: var(--danger-color);
        }

        .badge-secondary {
            background-color: rgba(100, 116, 139, 0.1);
            color: var(--gray-color);
        }

        .pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-top: 1.5rem;
            gap: 4px;
        }

        .page-btn {
            width: 36px;
            height: 36px;
            border-radius: 6px;
            border: 1px solid var(--border-color);
            background-color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 0.9rem;
        }

        .page-btn:hover {
            border-color: var(--primary-color);
            color: var(--primary-color);
        }

        .page-btn.active {
            background-color: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }

        .page-btn.disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .page-info {
            margin: 0 10px;
            font-size: 0.9rem;
            color: var(--gray-color);
        }

        /* 表单样式 */
        .form-group {
            margin-bottom: 1.5rem;
        }

        .form-label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 500;
            font-size: 0.9rem;
        }

        .form-control {
            width: 100%;
            padding: 0.75rem 1rem;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            font-size: 0.9rem;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .form-control:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
        }

        .form-select {
            width: 100%;
            padding: 0.75rem 1rem;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            font-size: 0.9rem;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 1rem center;
            background-size: 16px;
        }

        .form-select:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
        }

        .form-text {
            margin-top: 0.5rem;
            font-size: 0.8rem;
            color: var(--gray-color);
        }

        .form-row {
            display: flex;
            gap: 1.5rem;
            margin-bottom: 1.5rem;
        }

        .form-col {
            flex: 1;
        }

        .text-danger {
            color: var(--danger-color);
        }

        /* 树形结构样式 */
        .tree-container {
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 1rem;
            background-color: white;
            margin-bottom: 1.5rem;
        }

        .tree-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }

        .tree-title {
            font-weight: 600;
            color: var(--dark-color);
        }

        .tree-actions {
            display: flex;
            gap: 8px;
        }

        .tree {
            list-style: none;
            padding-left: 0;
        }

        .tree-node {
            padding: 8px 12px;
            border-radius: 6px;
            cursor: pointer;
            display: flex;
            align-items: center;
            transition: all 0.2s ease;
            margin-bottom: 4px;
        }

        .tree-node:hover {
            background-color: rgba(30, 64, 175, 0.05);
        }

        .tree-node.active {
            background-color: rgba(30, 64, 175, 0.1);
            color: var(--primary-color);
        }

        .tree-toggle {
            margin-right: 8px;
            width: 20px;
            text-align: center;
            color: var(--gray-color);
        }

        .tree-content {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .tree-node-actions {
            display: flex;
            gap: 8px;
            opacity: 0;
            transition: opacity 0.2s ease;
        }

        .tree-node:hover .tree-node-actions {
            opacity: 1;
        }

        .tree-children {
            padding-left: 24px;
            margin-top: 4px;
            display: none;
        }

        .tree-item.expanded .tree-children {
            display: block;
        }

        /* 响应式调整 */
        @media (max-width: 992px) {
            .sidebar {
                position: fixed;
                left: -240px;
                height: 100vh;
            }

            .sidebar.open {
                left: 0;
            }

            .main-header {
                padding: 1rem;
            }

            .main-content {
                padding: 1rem;
            }

            .form-row {
                flex-direction: column;
                gap: 1rem;
                margin-bottom: 0;
            }
        }

        /* 模态框样式 */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 100;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .modal-overlay.open {
            opacity: 1;
            visibility: visible;
        }

        .modal {
            background-color: white;
            border-radius: 12px;
            width: 100%;
            max-width: 600px;
            max-height: 90vh;
            overflow-y: auto;
            transform: translateY(-20px);
            transition: transform 0.3s ease;
        }

        .modal-overlay.open .modal {
            transform: translateY(0);
        }

        .modal-header {
            padding: 1rem 1.5rem;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-title {
            font-size: 1.2rem;
            font-weight: 600;
        }

        .modal-close-btn {
            background: none;
            border: none;
            font-size: 1.2rem;
            color: var(--gray-color);
            cursor: pointer;
            transition: color 0.2s ease;
        }

        .modal-close-btn:hover {
            color: var(--danger-color);
        }

        .modal-body {
            padding: 1.5rem;
        }

        .modal-footer {
            padding: 1rem 1.5rem;
            border-top: 1px solid var(--border-color);
            display: flex;
            justify-content: flex-end;
            gap: 1rem;
        }

        .btn-cancel {
            background-color: transparent;
            border: 1px solid var(--border-color);
            color: var(--dark-color);
        }

        .btn-cancel:hover {
            background-color: rgba(0, 0, 0, 0.03);
        }

        /* 标签页样式 */
        .tab-list {
            display: flex;
            border-bottom: 1px solid var(--border-color);
            margin-bottom: 1.5rem;
        }

        .tab-item {
            padding: 0.75rem 1.5rem;
            cursor: pointer;
            font-weight: 500;
            border-bottom: 2px solid transparent;
        }

        .tab-item.active {
            color: var(--primary-color);
            border-bottom-color: var(--primary-color);
        }

        .tab-pane {
            display: none;
        }

        .tab-pane.active {
            display: block;
        }
        .schedule-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }
        
        .schedule-nav {
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        
        .schedule-week {
            display: flex;
            margin-bottom: 1rem;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            overflow: hidden;
        }
        
        .schedule-day {
            flex: 1;
            border-right: 1px solid var(--border-color);
            text-align: center;
            padding: 0.5rem;
            background-color: var(--light-color);
        }
        
        .schedule-day:last-child {
            border-right: none;
        }
        
        .schedule-day.active {
            background-color: var(--primary-color);
            color: white;
        }
        
        .schedule-day-name {
            font-weight: 600;
        }
        
        .schedule-day-date {
            font-size: 0.8rem;
        }
        
        .schedule-grid {
            display: grid;
            grid-template-columns: 100px repeat(7, 1fr);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            overflow: hidden;
        }
        
        .schedule-cell {
            padding: 0.5rem;
            border-right: 1px solid var(--border-color);
            border-bottom: 1px solid var(--border-color);
            min-height: 60px;
        }
        
        .schedule-cell.header {
            font-weight: 600;
            background-color: var(--light-color);
            text-align: center;
        }
        
        .schedule-cell:last-child {
            border-right: none;
        }
        
        .schedule-slot {
            background-color: rgba(59, 130, 246, 0.1);
            border-radius: 4px;
            padding: 0.25rem;
            margin-bottom: 0.25rem;
            font-size: 0.8rem;
        }
        
        .schedule-slot-title {
            font-weight: 500;
            margin-bottom: 0.1rem;
        }
        
        .schedule-slot-meta {
            font-size: 0.7rem;
            color: var(--gray-color);
        }
        
        .schedule-actions {
            display: flex;
            justify-content: flex-end;
            margin-top: 1.5rem;
            gap: 0.5rem;
        }
    </style>
</head>
<body>
<div class="sidebar">
    <div class="sidebar-header">
        <img src="https://images.unsplash.com/photo-1516541731731-ed9902096d3a?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NHx8c2Nob29sfGVufDB8fDB8fHww&auto=format&fit=crop&w=800&q=60" alt="Logo">
        <h1>智能服务大厅管理</h1>
    </div>

    <div class="sidebar-menu">
        <div class="menu-title">主菜单</div>

        <div class="menu-item">
            <a href="dashboard.html" class="menu-link">
                <i class="fas fa-tachometer-alt"></i>
                <span>控制台</span>
            </a>
        </div>

        <div class="menu-item">
            <a href="#" class="menu-link active">
                <i class="fas fa-building"></i>
                <span>部门管理</span>
            </a>
            <div class="submenu active">
                <a href="departments.html" class="submenu-link active">部门配置</a>
                <a href="staff.html" class="submenu-link">人员配置</a>
                <a href="scheduling.html" class="submenu-link">排班功能</a>
            </div>
        </div>

        <div class="menu-item">
            <a href="#" class="menu-link">
                <i class="fas fa-users"></i>
                <span>用户管理</span>
            </a>
            <div class="submenu">
                <a href="organizations.html" class="submenu-link">机构管理</a>
                <a href="user-groups.html" class="submenu-link">用户组</a>
                <a href="user-center.html" class="submenu-link">用户中心</a>
            </div>
        </div>

        <div class="menu-item">
            <a href="#" class="menu-link">
                <i class="fas fa-desktop"></i>
                <span>终端管理</span>
            </a>
            <div class="submenu">
                <a href="file-cabinets.html" class="submenu-link">文件柜设置</a>
                <a href="displays.html" class="submenu-link">显示端设置</a>
                <a href="windows.html" class="submenu-link">窗口设置</a>
                <a href="ratings.html" class="submenu-link">评价设置</a>
            </div>
        </div>

        <div class="menu-title">系统管理</div>

        <div class="menu-item">
            <a href="#" class="menu-link">
                <i class="fas fa-bullhorn"></i>
                <span>广播设置</span>
            </a>
            <div class="submenu">
                <a href="broadcast-operators.html" class="submenu-link">广播操作员</a>
                <a href="ticket-cards.html" class="submenu-link">纸质叫号卡</a>
            </div>
        </div>

        <div class="menu-item">
            <a href="#" class="menu-link">
                <i class="fas fa-exclamation-triangle"></i>
                <span>异常监控</span>
            </a>
            <div class="submenu">
                <a href="timeout-monitor.html" class="submenu-link">等候超时</a>
                <a href="offline-monitor.html" class="submenu-link">窗口离线</a>
                <a href="blacklist.html" class="submenu-link">黑名单管理</a>
            </div>
        </div>

        <div class="menu-item">
            <a href="rules.html" class="menu-link">
                <i class="fas fa-sliders-h"></i>
                <span>规则设置</span>
            </a>
        </div>

        <div class="menu-item">
            <a href="schedules.html" class="menu-link">
                <i class="fas fa-calendar-alt"></i>
                <span>排班管理</span>
            </a>
        </div>

        <div class="menu-item">
            <a href="permissions.html" class="menu-link">
                <i class="fas fa-user-shield"></i>
                <span>权限设置</span>
            </a>
        </div>

        <div class="menu-item">
            <a href="statistics.html" class="menu-link">
                <i class="fas fa-chart-line"></i>
                <span>数据统计</span>
            </a>
            <div class="submenu">
                <a href="operation-charts.html" class="submenu-link">运维图表</a>
                <a href="data-reports.html" class="submenu-link">数据报表</a>
                <a href="export-tools.html" class="submenu-link">导出工具</a>
            </div>
        </div>
    </div>

    <div class="sidebar-footer">
        <div class="user-profile">
            <img src="https://images.unsplash.com/photo-1580489944761-15a19d654956?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8M3x8cGVyc29ufGVufDB8fDB8fHww&auto=format&fit=crop&w=800&q=60" alt="User">
            <div class="user-info">
                <h4>管理员</h4>
                <p>admin@school.edu.cn</p>
            </div>
        </div>
    </div>
</div>

<div class="main-container">
      <div class="main-header">
        <div class="header-left">
            <button class="toggle-sidebar-btn">
                <i class="fas fa-bars"></i>
            </button>
            <div class="breadcrumb">
                <div class="breadcrumb-item">
                    <a href="dashboard.html">首页</a>
                </div>
                <div class="breadcrumb-item">
                    <a href="#">部门管理</a>
                </div>
                <div class="breadcrumb-item active">
                    部门配置
                </div>
            </div>
        </div>
        <div class="header-right">
            <button class="header-action-btn">
                <i class="fas fa-bell"></i>
                <span class="notification-badge">3</span>
            </button>
            <button class="header-action-btn">
                <i class="fas fa-envelope"></i>
            </button>
            <button class="header-action-btn">
                <i class="fas fa-question-circle"></i>
            </button>
        </div>
    </div>


    <div class="main-content">
        <div class="content-header">
            <h2 class="content-title">排班管理</h2>
            <div class="content-actions">
                <button class="btn btn-primary" id="addScheduleBtn">
                    <i class="fas fa-plus"></i> 新增排班
                </button>
                <button class="btn btn-outline" id="refreshBtn">
                    <i class="fas fa-sync-alt"></i> 刷新
                </button>
                <button class="btn btn-outline" id="exportBtn">
                    <i class="fas fa-download"></i> 导出
                </button>
            </div>
        </div>

        <div class="card">
            <div class="card-header">
                <div class="card-title">排班表</div>
                <div class="card-tools">
                    <select class="form-control" id="deptFilter" style="width: 150px;">
                        <option value="">全部部门</option>
                        <option value="1">校务处</option>
                        <option value="2">教务处</option>
                        <option value="3">学生处</option>
                    </select>
                    <input type="week" class="form-control" id="weekPicker" style="width: 180px;">
                    <button class="btn btn-primary" id="searchBtn">查询</button>
                </div>
            </div>
            <div class="card-body">
                <div class="schedule-header">
                    <h3>2023年8月第3周排班表</h3>
                    <div class="schedule-nav">
                        <button class="btn btn-outline">
                            <i class="fas fa-chevron-left"></i> 上一周
                        </button>
                        <button class="btn btn-outline">
                            本周
                        </button>
                        <button class="btn btn-outline">
                            下一周 <i class="fas fa-chevron-right"></i>
                        </button>
                    </div>
                </div>

                <div class="schedule-week">
                    <div class="schedule-day">
                        <div class="schedule-day-name">周一</div>
                        <div class="schedule-day-date">8/14</div>
                    </div>
                    <div class="schedule-day active">
                        <div class="schedule-day-name">周二</div>
                        <div class="schedule-day-date">8/15</div>
                    </div>
                    <div class="schedule-day">
                        <div class="schedule-day-name">周三</div>
                        <div class="schedule-day-date">8/16</div>
                    </div>
                    <div class="schedule-day">
                        <div class="schedule-day-name">周四</div>
                        <div class="schedule-day-date">8/17</div>
                    </div>
                    <div class="schedule-day">
                        <div class="schedule-day-name">周五</div>
                        <div class="schedule-day-date">8/18</div>
                    </div>
                    <div class="schedule-day">
                        <div class="schedule-day-name">周六</div>
                        <div class="schedule-day-date">8/19</div>
                    </div>
                    <div class="schedule-day">
                        <div class="schedule-day-name">周日</div>
                        <div class="schedule-day-date">8/20</div>
                    </div>
                </div>

                <div class="schedule-grid">
                    <!-- 表头 -->
                    <div class="schedule-cell header">时间</div>
                    <div class="schedule-cell header">周一<br>8/14</div>
                    <div class="schedule-cell header">周二<br>8/15</div>
                    <div class="schedule-cell header">周三<br>8/16</div>
                    <div class="schedule-cell header">周四<br>8/17</div>
                    <div class="schedule-cell header">周五<br>8/18</div>
                    <div class="schedule-cell header">周六<br>8/19</div>
                    <div class="schedule-cell header">周日<br>8/20</div>

                    <!-- 上午时段 -->
                    <div class="schedule-cell header">上午<br>8:30-12:00</div>
                    <div class="schedule-cell">
                        <div class="schedule-slot">
                            <div class="schedule-slot-title">张三</div>
                            <div class="schedule-slot-meta">1号窗口</div>
                        </div>
                    </div>
                    <div class="schedule-cell">
                        <div class="schedule-slot">
                            <div class="schedule-slot-title">李四</div>
                            <div class="schedule-slot-meta">2号窗口</div>
                        </div>
                        <div class="schedule-slot">
                            <div class="schedule-slot-title">王五</div>
                            <div class="schedule-slot-meta">3号窗口</div>
                        </div>
                    </div>
                    <div class="schedule-cell">
                        <div class="schedule-slot">
                            <div class="schedule-slot-title">张三</div>
                            <div class="schedule-slot-meta">1号窗口</div>
                        </div>
                    </div>
                    <div class="schedule-cell">
                        <div class="schedule-slot">
                            <div class="schedule-slot-title">李四</div>
                            <div class="schedule-slot-meta">2号窗口</div>
                        </div>
                    </div>
                    <div class="schedule-cell">
                        <div class="schedule-slot">
                            <div class="schedule-slot-title">王五</div>
                            <div class="schedule-slot-meta">3号窗口</div>
                        </div>
                    </div>
                    <div class="schedule-cell">
                        <div class="schedule-slot" style="background-color: rgba(239, 68, 68, 0.1);">
                            <div class="schedule-slot-title">休息日</div>
                        </div>
                    </div>
                    <div class="schedule-cell">
                        <div class="schedule-slot" style="background-color: rgba(239, 68, 68, 0.1);">
                            <div class="schedule-slot-title">休息日</div>
                        </div>
                    </div>

                    <!-- 下午时段 -->
                    <div class="schedule-cell header">下午<br>13:30-17:00</div>
                    <div class="schedule-cell">
                        <div class="schedule-slot">
                            <div class="schedule-slot-title">赵六</div>
                            <div class="schedule-slot-meta">1号窗口</div>
                        </div>
                    </div>
                    <div class="schedule-cell">
                        <div class="schedule-slot">
                            <div class="schedule-slot-title">钱七</div>
                            <div class="schedule-slot-meta">2号窗口</div>
                        </div>
                        <div class="schedule-slot">
                            <div class="schedule-slot-title">孙八</div>
                            <div class="schedule-slot-meta">3号窗口</div>
                        </div>
                    </div>
                    <div class="schedule-cell">
                        <div class="schedule-slot">
                            <div class="schedule-slot-title">赵六</div>
                            <div class="schedule-slot-meta">1号窗口</div>
                        </div>
                    </div>
                    <div class="schedule-cell">
                        <div class="schedule-slot">
                            <div class="schedule-slot-title">钱七</div>
                            <div class="schedule-slot-meta">2号窗口</div>
                        </div>
                    </div>
                    <div class="schedule-cell">
                        <div class="schedule-slot">
                            <div class="schedule-slot-title">孙八</div>
                            <div class="schedule-slot-meta">3号窗口</div>
                        </div>
                    </div>
                    <div class="schedule-cell">
                        <div class="schedule-slot" style="background-color: rgba(239, 68, 68, 0.1);">
                            <div class="schedule-slot-title">休息日</div>
                        </div>
                    </div>
                    <div class="schedule-cell">
                        <div class="schedule-slot" style="background-color: rgba(239, 68, 68, 0.1);">
                            <div class="schedule-slot-title">休息日</div>
                        </div>
                    </div>
                </div>

                <div class="schedule-actions">
                    <button class="btn btn-outline">复制上周排班</button>
                    <button class="btn btn-outline">清空当前排班</button>
                    <button class="btn btn-primary">保存排班表</button>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 新增排班模态框 -->
<div class="modal-overlay" id="scheduleModal">
    <div class="modal" style="max-width: 600px;">
        <div class="modal-header">
            <h3 class="modal-title">新增排班</h3>
            <button class="modal-close-btn" id="closeModalBtn">
                <i class="fas fa-times"></i>
            </button>
        </div>
        <div class="modal-body">
            <form id="scheduleForm">
                <div class="form-group">
                    <label class="form-label">日期 <span class="text-danger">*</span></label>
                    <input type="date" class="form-control" id="scheduleDate" required>
                </div>

                <div class="form-row">
                    <div class="form-col">
                        <div class="form-group">
                            <label class="form-label">开始时间 <span class="text-danger">*</span></label>
                            <input type="time" class="form-control" id="startTime" value="08:30" required>
                        </div>
                    </div>
                    <div class="form-col">
                        <div class="form-group">
                            <label class="form-label">结束时间 <span class="text-danger">*</span></label>
                            <input type="time" class="form-control" id="endTime" value="12:00" required>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="form-label">窗口 <span class="text-danger">*</span></label>
                    <select class="form-control" id="window" required>
                        <option value="">请选择窗口</option>
                        <option value="1">1号综合窗口</option>
                        <option value="2">2号教务窗口</option>
                        <option value="3">3号财务窗口</option>
                    </select>
                </div>

                <div class="form-group">
                    <label class="form-label">值班人员 <span class="text-danger">*</span></label>
                    <select class="form-control" id="staff" required>
                        <option value="">请选择值班人员</option>
                        <option value="1">张三</option>
                        <option value="2">李四</option>
                        <option value="3">王五</option>
                        <option value="4">赵六</option>
                        <option value="5">钱七</option>
                        <option value="6">孙八</option>
                    </select>
                </div>

                <div class="form-group">
                    <label class="form-label">备注</label>
                    <textarea class="form-control" id="remark" rows="2" placeholder="请输入备注信息"></textarea>
                </div>
            </form>
        </div>
        <div class="modal-footer">
            <button class="btn btn-cancel" id="cancelScheduleBtn">取消</button>
            <button class="btn btn-primary" id="saveScheduleBtn">保存</button>
        </div>
    </div>
</div>

<script>
    // 共用JavaScript逻辑已存在于manage_v1.3.html中
    // 这里只需添加特定于排班管理的逻辑
    
    // 打开新增排班模态框
    document.getElementById('addScheduleBtn').addEventListener('click', function() {
        document.getElementById('scheduleModal').classList.add('open');
    });

    // 点击日期单元格
    document.querySelectorAll('.schedule-cell:not(.header)').forEach(cell => {
        cell.addEventListener('click', function() {
            const colIndex = [...this.parentNode.children].indexOf(this);
            const day = document.querySelectorAll('.schedule-day')[colIndex - 1];
            const date = day.querySelector('.schedule-day-date').textContent;
            
            // 填充模态框
            document.getElementById('scheduleDate').value = `2023-08-${date.split('/')[1]}`;
            document.getElementById('scheduleModal').classList.add('open');
        });
    });
</script>
</body>
</html>